import { Button, Table, Pagination } from 'antd'
import { Component, PureComponent } from 'react'
// const TableList = (props) => {
//   const { showModal, tableList, columns } = props
//   return (
//     <>
//       <Button style={{ margin: 20 }} onClick={showModal} type="primary">
//         新增
//       </Button>
//       <Table pagination={false} dataSource={tableList} columns={columns} />
//     </>
//   )
// }

class TableList extends PureComponent {
  render() {
    const { showModal, tableList, columns } = this.props
    return (
      <>
        <Button style={{ margin: 20 }} onClick={showModal} type="primary">
          新增
        </Button>
        <Table pagination={false} dataSource={tableList} columns={columns} />
      </>
    )
  }
}

// const TableList = (props) => {}

export default TableList
